
#define NSAMPLES 7

uniform vec2 direction;
uniform float BlurWidth;
uniform vec2 WindowSize;
varying vec2 texCoord[7];

void main ()
{
	vec2 texelSize;
	texelSize.s = BlurWidth / WindowSize.x;
	texelSize.t = BlurWidth / WindowSize.y;
	vec2 s = gl_MultiTexCoord0.st - texelSize*(NSAMPLES-1)*0.5*direction;
	for (int i=0;i<NSAMPLES;i++)
	{
		texCoord[i].st = s.st + texelSize*i*direction;
	}
	gl_Position = ftransform();
}